/*
 Navicat Premium Data Transfer

 Source Server         : 监所
 Source Server Type    : PostgreSQL
 Source Server Version : 90204 (90204)
 Source Host           : 47.108.95.57:15432
 Source Catalog        : sjyy
 Source Schema         : public

 Target Server Type    : PostgreSQL
 Target Server Version : 90204 (90204)
 File Encoding         : 65001

 Date: 22/10/2025 16:18:43
*/


-- ----------------------------
-- Table structure for person_item_type
-- ----------------------------
DROP TABLE IF EXISTS "public"."person_item_type";
CREATE TABLE "public"."person_item_type" (
  "id" varchar(32) COLLATE "pg_catalog"."default" NOT NULL,
  "case_person_id" varchar(32) COLLATE "pg_catalog"."default" NOT NULL,
  "dict_code" varchar(32) COLLATE "pg_catalog"."default" NOT NULL,
  "item_value" varchar(32) COLLATE "pg_catalog"."default" NOT NULL,
  "del_flag" int4 DEFAULT 0,
  "create_by" varchar(32) COLLATE "pg_catalog"."default",
  "create_time" timestamp(6) NOT NULL DEFAULT pg_systimestamp(),
  "update_by" varchar(32) COLLATE "pg_catalog"."default",
  "update_time" timestamp(6),
  "case_number" varchar(32) COLLATE "pg_catalog"."default"
)
;
ALTER TABLE "public"."person_item_type" OWNER TO "guass";
COMMENT ON COLUMN "public"."person_item_type"."id" IS '关联ID';
COMMENT ON COLUMN "public"."person_item_type"."case_person_id" IS '警情人员ID';
COMMENT ON COLUMN "public"."person_item_type"."dict_code" IS '字典编码(所属类型eg:特殊身份,人员类型)';
COMMENT ON COLUMN "public"."person_item_type"."item_value" IS '字典项值:(人员属性值)';
COMMENT ON COLUMN "public"."person_item_type"."del_flag" IS '状态(0:存在 1:删除)';
COMMENT ON COLUMN "public"."person_item_type"."create_by" IS '创建人员';
COMMENT ON COLUMN "public"."person_item_type"."create_time" IS '创建时间';
COMMENT ON COLUMN "public"."person_item_type"."update_by" IS '更新人';
COMMENT ON COLUMN "public"."person_item_type"."update_time" IS '更新时间';
COMMENT ON COLUMN "public"."person_item_type"."case_number" IS '警情Id(非主键id)';

-- ----------------------------
-- Indexes structure for table person_item_type
-- ----------------------------
CREATE INDEX "idx_person_item_type_composite_1" ON "public"."person_item_type" USING btree (
  "case_number" COLLATE "pg_catalog"."default" "pg_catalog"."text_ops" ASC NULLS LAST,
  "dict_code" COLLATE "pg_catalog"."default" "pg_catalog"."text_ops" ASC NULLS LAST,
  "item_value" COLLATE "pg_catalog"."default" "pg_catalog"."text_ops" ASC NULLS LAST,
  "del_flag" "pg_catalog"."int4_ops" ASC NULLS LAST,
  "case_person_id" COLLATE "pg_catalog"."default" "pg_catalog"."text_ops" ASC NULLS LAST
);
CREATE INDEX "idx_pit_special_items_1" ON "public"."person_item_type" USING btree (
  "dict_code" COLLATE "pg_catalog"."default" "pg_catalog"."text_ops" ASC NULLS LAST,
  "del_flag" "pg_catalog"."int4_ops" ASC NULLS LAST,
  "item_value" COLLATE "pg_catalog"."default" "pg_catalog"."text_ops" ASC NULLS LAST
);

-- ----------------------------
-- Primary Key structure for table person_item_type
-- ----------------------------
ALTER TABLE "public"."person_item_type" ADD CONSTRAINT "person_item_type_pkey_1" PRIMARY KEY ("id");
